<template>
	<view class="container">
		<u-parse :content="content"></u-parse>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				type: null,
				content: ''
			}
		},
		onLoad({
			type,
			title
		}) {
			uni.setNavigationBarTitle({
				title
			})
			this.type = type
			this.getAppConfig()
		},
		methods: {
			//获取协议
			getAppConfig() {
				this.$api.get_wechat_config({
					key: this.type
				}).then(res => {
					this.content = res
				})
			}
		},
	}
</script>

<style lang="scss" scoped>
	.container {
		padding: 24rpx 30rpx;
	}
</style>